body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    background-color: #007BFF;
    color: white;
    padding: 15px;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    white-space: pre-wrap !important; /* 保留换行符并自动换行 */
    word-break: break-word;
    background-color: #f4f4f4; /* 背景颜色 */
    padding: 10px; /* 内边距 */
    border: 1px solid #ccc; /* 边框 */
    border-radius: 5px; /* 圆角 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica;
}

pre {
    background: #f6f8fa;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    tab-size: 4;
	white-space: pre-wrap;
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* 增强空格显示 */
pre.code-block code {
  display: inline-block;
  letter-spacing: 0.1em;
}

/* 处理连续空格 */
pre.code-block code::before {
  content: "";
  white-space: pre;
}


.message {
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    max-width: 90%;
    word-wrap: break-word;
}

.user-message {
    background-color: #e0f7fa;
    align-self: flex-end;
}

.ai-message {
    background-color: #f1f3f4;
    align-self: flex-start;
}

.input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ccc;
}

#user-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
}

#user-id {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
    width: 120px;
}

#send-button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

#send-button:hover {
    background-color: #0056b3;
}